import PyPDF2

def read_pdf():
    try:
        pdf_file = open('FastAPI.pdf', 'rb')
        pdf_reader = PyPDF2.PdfReader(pdf_file)
        text = ''
        for page in pdf_reader.pages:
            text += page.extract_text()
        pdf_file.close()
        return text
    except Exception as e:
        return f"Error reading PDF: {str(e)}"

if __name__ == '__main__':
    content = read_pdf()
    print(content)